Optimal. Leaf size=268 \[ -\frac{(e x)^{m+1} (b c-a d) \, _2F_1\left (1,\frac{m+1}{n};\frac{m+n+1}{n};-\frac{b x^n}{a}\right ) (A b (b c (m-n+1)-a d (m+n+1))-a B (b c (m+1)-a d (m+2 n+1)))}{a^2 b^3 e (m+1) n}-\frac{d (e x)^{m+1} (A b (2 b c (m+1)-a d (m+n+1))-a B (2 b c (m+n+1)-a d (m+2 n+1)))}{a b^3 e (m+1) n}-\frac{d^2 x^{n+1} (e x)^m (A b (m+n+1)-a B (m+2 n+1))}{a b^2 n (m+n+1)}+\frac{(e x)^{m+1} (A b-a B) \left (c+d x^n\right )^2}{a b e n \left (a+b x^n\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.668707, antiderivative size = 268, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.161, Rules used = {594, 570, 20, 30, 364} \[ -\frac{(e x)^{m+1} (b c-a d) \, _2F_1\left (1,\frac{m+1}{n};\frac{m+n+1}{n};-\frac{b x^n}{a}\right ) (A b (b c (m-n+1)-a d (m+n+1))-a B (b c (m+1)-a d (m+2 n+1)))}{a^2 b^3 e (m+1) n}-\frac{d (e x)^{m+1} (A b (2 b c (m+1)-a d (m+n+1))-a B (2 b c (m+n+1)-a d (m+2 n+1)))}{a b^3 e (m+1) n}-\frac{d^2 x^{n+1} (e x)^m (A b (m+n+1)-a B (m+2 n+1))}{a b^2 n (m+n+1)}+\frac{(e x)^{m+1} (A b-a B) \left (c+d x^n\right )^2}{a b e n \left (a+b x^n\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 594
Rule 570
Rule 20
Rule 30
Rule 364
Rubi steps
\begin{align*} \int \frac{(e x)^m \left (A+B x^n\right ) \left (c+d x^n\right )^2}{\left (a+b x^n\right )^2} \, dx &=\frac{(A b-a B) (e x)^{1+m} \left (c+d x^n\right )^2}{a b e n \left (a+b x^n\right )}-\frac{\int \frac{(e x)^m \left (c+d x^n\right ) \left (-c (a B (1+m)-A b (1+m-n))+d (A b (1+m+n)-a B (1+m+2 n)) x^n\right )}{a+b x^n} \, dx}{a b n}\\ &=\frac{(A b-a B) (e x)^{1+m} \left (c+d x^n\right )^2}{a b e n \left (a+b x^n\right )}-\frac{\int \left (\frac{d (A b (2 b c (1+m)-a d (1+m+n))-a B (2 b c (1+m+n)-a d (1+m+2 n))) (e x)^m}{b^2}+\frac{d^2 (A b (1+m+n)-a B (1+m+2 n)) x^n (e x)^m}{b}+\frac{(b c-a d) (A b (b c (1+m-n)-a d (1+m+n))-a B (b c (1+m)-a d (1+m+2 n))) (e x)^m}{b^2 \left (a+b x^n\right )}\right ) \, dx}{a b n}\\ &=-\frac{d (A b (2 b c (1+m)-a d (1+m+n))-a B (2 b c (1+m+n)-a d (1+m+2 n))) (e x)^{1+m}}{a b^3 e (1+m) n}+\frac{(A b-a B) (e x)^{1+m} \left (c+d x^n\right )^2}{a b e n \left (a+b x^n\right )}-\frac{\left (d^2 (A b (1+m+n)-a B (1+m+2 n))\right ) \int x^n (e x)^m \, dx}{a b^2 n}-\frac{((b c-a d) (A b (b c (1+m-n)-a d (1+m+n))-a B (b c (1+m)-a d (1+m+2 n)))) \int \frac{(e x)^m}{a+b x^n} \, dx}{a b^3 n}\\ &=-\frac{d (A b (2 b c (1+m)-a d (1+m+n))-a B (2 b c (1+m+n)-a d (1+m+2 n))) (e x)^{1+m}}{a b^3 e (1+m) n}+\frac{(A b-a B) (e x)^{1+m} \left (c+d x^n\right )^2}{a b e n \left (a+b x^n\right )}-\frac{(b c-a d) (A b (b c (1+m-n)-a d (1+m+n))-a B (b c (1+m)-a d (1+m+2 n))) (e x)^{1+m} \, _2F_1\left (1,\frac{1+m}{n};\frac{1+m+n}{n};-\frac{b x^n}{a}\right )}{a^2 b^3 e (1+m) n}-\frac{\left (d^2 (A b (1+m+n)-a B (1+m+2 n)) x^{-m} (e x)^m\right ) \int x^{m+n} \, dx}{a b^2 n}\\ &=-\frac{d^2 (A b (1+m+n)-a B (1+m+2 n)) x^{1+n} (e x)^m}{a b^2 n (1+m+n)}-\frac{d (A b (2 b c (1+m)-a d (1+m+n))-a B (2 b c (1+m+n)-a d (1+m+2 n))) (e x)^{1+m}}{a b^3 e (1+m) n}+\frac{(A b-a B) (e x)^{1+m} \left (c+d x^n\right )^2}{a b e n \left (a+b x^n\right )}-\frac{(b c-a d) (A b (b c (1+m-n)-a d (1+m+n))-a B (b c (1+m)-a d (1+m+2 n))) (e x)^{1+m} \, _2F_1\left (1,\frac{1+m}{n};\frac{1+m+n}{n};-\frac{b x^n}{a}\right )}{a^2 b^3 e (1+m) n}\\ \end{align*}
Mathematica [A] time = 0.245594, size = 159, normalized size = 0.59 \[ \frac{x (e x)^m \left (\frac{(A b-a B) (b c-a d)^2 \, _2F_1\left (2,\frac{m+1}{n};\frac{m+n+1}{n};-\frac{b x^n}{a}\right )}{a^2 (m+1)}+\frac{(b c-a d) (-3 a B d+2 A b d+b B c) \, _2F_1\left (1,\frac{m+1}{n};\frac{m+n+1}{n};-\frac{b x^n}{a}\right )}{a (m+1)}+\frac{d (-2 a B d+A b d+2 b B c)}{m+1}+\frac{b B d^2 x^n}{m+n+1}\right )}{b^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.5, size = 0, normalized size = 0. \begin{align*} \int{\frac{ \left ( ex \right ) ^{m} \left ( A+B{x}^{n} \right ) \left ( c+d{x}^{n} \right ) ^{2}}{ \left ( a+b{x}^{n} \right ) ^{2}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} -{\left ({\left (a^{2} b d^{2} e^{m}{\left (m + n + 1\right )} + b^{3} c^{2} e^{m}{\left (m - n + 1\right )} - 2 \, a b^{2} c d e^{m}{\left (m + 1\right )}\right )} A -{\left (a^{3} d^{2} e^{m}{\left (m + 2 \, n + 1\right )} - 2 \, a^{2} b c d e^{m}{\left (m + n + 1\right )} + a b^{2} c^{2} e^{m}{\left (m + 1\right )}\right )} B\right )} \int \frac{x^{m}}{a b^{4} n x^{n} + a^{2} b^{3} n}\,{d x} + \frac{{\left (m n + n\right )} B a b^{2} d^{2} e^{m} x e^{\left (m \log \left (x\right ) + 2 \, n \log \left (x\right )\right )} +{\left ({\left ({\left (m^{2} + m{\left (n + 2\right )} + n + 1\right )} b^{3} c^{2} e^{m} - 2 \,{\left (m^{2} + m{\left (n + 2\right )} + n + 1\right )} a b^{2} c d e^{m} +{\left (m^{2} + 2 \, m{\left (n + 1\right )} + n^{2} + 2 \, n + 1\right )} a^{2} b d^{2} e^{m}\right )} A -{\left ({\left (m^{2} + m{\left (n + 2\right )} + n + 1\right )} a b^{2} c^{2} e^{m} - 2 \,{\left (m^{2} + 2 \, m{\left (n + 1\right )} + n^{2} + 2 \, n + 1\right )} a^{2} b c d e^{m} +{\left (m^{2} + m{\left (3 \, n + 2\right )} + 2 \, n^{2} + 3 \, n + 1\right )} a^{3} d^{2} e^{m}\right )} B\right )} x x^{m} +{\left ({\left (m n + n^{2} + n\right )} A a b^{2} d^{2} e^{m} +{\left (2 \,{\left (m n + n^{2} + n\right )} a b^{2} c d e^{m} -{\left (m n + 2 \, n^{2} + n\right )} a^{2} b d^{2} e^{m}\right )} B\right )} x e^{\left (m \log \left (x\right ) + n \log \left (x\right )\right )}}{{\left (m^{2} n +{\left (n^{2} + 2 \, n\right )} m + n^{2} + n\right )} a b^{4} x^{n} +{\left (m^{2} n +{\left (n^{2} + 2 \, n\right )} m + n^{2} + n\right )} a^{2} b^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{{\left (B d^{2} x^{3 \, n} + A c^{2} +{\left (2 \, B c d + A d^{2}\right )} x^{2 \, n} +{\left (B c^{2} + 2 \, A c d\right )} x^{n}\right )} \left (e x\right )^{m}}{b^{2} x^{2 \, n} + 2 \, a b x^{n} + a^{2}}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (B x^{n} + A\right )}{\left (d x^{n} + c\right )}^{2} \left (e x\right )^{m}}{{\left (b x^{n} + a\right )}^{2}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]